package org.amse.mARICa.model.impl;

import org.amse.mARICa.model.EBantumiException;

public class BantumiException extends Exception {

	private static final long serialVersionUID = 1L;
	private EBantumiException  myException;
	private String myMess;
	
	public BantumiException (EBantumiException ex){
		super();
		myException = ex;
	}
	
	public BantumiException (EBantumiException ex, String origMess){
		super();
		myException = ex;
		myMess = origMess;
	}
	
	public BantumiException (String origMess){
		super();
		myException = null;
		myMess = origMess;
	}
	
	public EBantumiException getCode(){
		return myException;
	}
	
	public String getOrigMessage (){
		return myMess;
	}
	
	public String getMessage(){
		if (myException == null){
			return myMess;
		}
		return myException.getStringValue();
	}

}
